// this is a sample file reader program

#include<iostream>
#include<fstream>
#include<string>
#include<string.h>

using namespace std;
int main(){

	string line;
	ifstream file("example.txt");
	if(file.is_open()){
		while(file.good()){
			getline(file,line);
			cout<<line<<endl;
			
	char p[line.size() + 1];
	p[line.size()] = 0;
	memcpy(p, line.c_str(),line.size());
	char *tokens;
	tokens = strtok(p, "-");
	while(tokens!=NULL){
		cout<<tokens<<endl;
		tokens = strtok(NULL, "-");
	}
		}
	file.close();
	
	}
	else{
		cout<<"unable to open file"<<endl;
	}
	return 0;
}	
